﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using BeetleX.Http.Clients;
using DEEBCG.ExternalLib.CompanyAPI.Model;
using Huiyang.Web.CompanyApi.Models;

namespace DEEBCG.ExternalLib.CompanyAPI
{
    /// <summary>
    /// 获取Alarm接口类
    /// </summary>
    [Controller(BaseUrl = "/api/Alarm/")]
    public interface IAlarm
    {
        /// <summary>
        /// 获取指定用户预警信息
        /// </summary>
        /// <param name="userID">用户编号</param>
        /// <param name="category">预警分类（不提供就是全部）</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <returns></returns>
        [Get]
        Task<ResultInfo<List<AlarmInfo>>> GetUserAlarmList(string userID, string category, DateTime start, DateTime end, [Header("DEEBCG")]string token);

        /// <summary>
        /// 获取指定机构预警信息
        /// </summary>
        /// <param name="companyID">机构编号</param>
        /// <param name="category">预警分类（不提供就是全部）</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <returns></returns>
        [Get]
        Task<ResultInfo<List<AlarmInfo>>> GetCompanyAlarmList(string companyID, string category, DateTime start, DateTime end, [Header("DEEBCG")] string token);

        /// <summary>
        /// 阅读预警信息
        /// </summary>
        /// <param name="info">阅读预警信息参数</param>
        /// <returns></returns>
        [Post]
        Task<ResultInfo<string>> ReadAlarm(ReadAlarmInfo info, [Header("DEEBCG")] string token);


        /// <summary>
        /// 处理预警信息
        /// </summary>
        /// <param name="info">处理预警信息参数</param>
        /// <returns></returns>
        [Post]
        Task<ResultInfo<string>> HandleAlarm(HandleAlarmInfo info, [Header("DEEBCG")] string token);

        /// <summary>
        /// 获取指定预警信息
        /// </summary>
        /// <param name="id">预警编号</param>
        /// <returns></returns>
        [Get]
        Task<ResultInfo<AlarmInfo>> GetAlarm(int id, [Header("DEEBCG")] string token);

    }
}
